dgb(phase-b): wire per-connection coinbase payout split to PPLNS SSOT (#327-gated follow-on) - #330
Merged
frstrtr merged 1 commit intoJun 22, 2026
Conversation
build_connection_coinbase_from_pplns delegates the payout split to compute_pplns_payout_split() -- the same helper generate_share_transaction (the share verification path, #329) calls -- instead of taking pre-resolved payout_outputs/donation_amount. The coinbase a miner hashes per-connection and the coinbase the share check enforces are now byte-identical on every payout satoshi by construction: one payout implementation, not two kept in agreement. Pure delegation + field forwarding into build_connection_coinbase_parts; no inline payout arithmetic. dgb-tree-only. 4 delegation-identity KATs (V36, pre-V36 finder fee, segwit/ref forwarding, value anchor); 8/8 green. Stacks on the #328/#329 PPLNS SSOT stack.
frstrtr
force-pushed
the
dgb/pplns-delegate-verifier
branch
from
June 22, 2026 14:17
57cb51d to
a27a9a8
Compare
frstrtr
force-pushed
the
dgb/pplns-conn-coinbase-wire
branch
from
June 22, 2026 14:17
9cea8b7 to
9d1eac2
Compare
frstrtr
added a commit
that referenced
this pull request
Jun 22, 2026
…via producer seam Replace the empty build_connection_coinbase() stub with a delegation to build_connection_coinbase_from_pplns (the #330 SSOT that itself routes through the single compute_pplns_payout_split the verifier calls). A new set_pplns_inputs_fn producer seam supplies the PPLNS weight map (walked from the ShareTracker), ref_hash, subsidy and donation script; the tracker walk stays in main_dgb where the ShareTracker + CoinParams are in scope, so no sharechain logic leaks into the work source. Fenced: while the seam is UNBOUND (or returns nullopt) the method is byte-identical to the pre-wire stub (empty job, no work pushed) -- runtime behavior is unchanged until main_dgb binds the producer (follow-on slice). The emitted coinb1/coinb2 are byte-identical to the verifier per a KAT comparing the wired output to the SSOT called directly with the same inputs. 3 KATs added (empty-until-wired, byte-identical delegation, nullopt->empty); dgb_work_source_test 26/26 green.
Owner
Author
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
…via producer seam Replace the empty build_connection_coinbase() stub with a delegation to build_connection_coinbase_from_pplns (the #330 SSOT that itself routes through the single compute_pplns_payout_split the verifier calls). A new set_pplns_inputs_fn producer seam supplies the PPLNS weight map (walked from the ShareTracker), ref_hash, subsidy and donation script; the tracker walk stays in main_dgb where the ShareTracker + CoinParams are in scope, so no sharechain logic leaks into the work source. Fenced: while the seam is UNBOUND (or returns nullopt) the method is byte-identical to the pre-wire stub (empty job, no work pushed) -- runtime behavior is unchanged until main_dgb binds the producer (follow-on slice). The emitted coinb1/coinb2 are byte-identical to the verifier per a KAT comparing the wired output to the SSOT called directly with the same inputs. 3 KATs added (empty-until-wired, byte-identical delegation, nullopt->empty); dgb_work_source_test 26/26 green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wires the per-connection Stratum coinbase assembler (build_connection_coinbase_parts, #327) to the PPLNS payout-split SSOT (compute_pplns_payout_split, #328/#329).
New build_connection_coinbase_from_pplns takes the raw PPLNS weight map + subsidy and delegates the amount split to compute_pplns_payout_split() — the SAME helper generate_share_transaction (the share verification path, #329) calls — instead of accepting pre-resolved payout_outputs/donation_amount.
Why
The coinbase a miner hashes per-connection and the coinbase the share check enforces now draw from one payout implementation. Byte-identity on every payout satoshi is a property of the code, not a second test of a second implementation. No inline payout arithmetic reintroduced; pure delegation + field forwarding.
Scope / safety
Stacking
Stacks on #328 → #329. Base retargets to master once #329 lands. Ready the instant the stack lands (#327 already on master).